package com.pentofab.payrollmanagement.dao;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;




import java.util.LinkedHashMap;

import com.pentofab.payrollmanagement.dao.model.Attendance;
import com.pentofab.payrollmanagement.dao.model.Employee;
import com.pentofab.payrollmanagement.exception.BusinessException;
import com.pentofab.payrollmanagement.exception.DatabaseException;
import com.pentofab.payrollmanagement.exception.ExceptionMsg;

public interface AttendanceDao extends ExceptionMsg {


	
	
	/**
	 * Adds the attandeance entry.
	 *
	 * @param empId the emp id
	 * @param date the date
	 * @param loginTime the login time
	 * @throws DatabaseException 
	 * @throws Exception the exception
	 */
	public void addAttandeanceEntry(
			String empId, Date date, String loginTime,String logOutTime,String createdEmp,int rowNum,boolean firstIn, boolean lastOut) throws BusinessException;
	
	/**
	 * Setlog out time.
	 *
	 * @param logOutTime the log out time
	 * @param rowNumber the row number
	 * @throws Exception the exception
	 */
	public void setlogOutTime(Attendance latestAttEntry) throws BusinessException;
		
	/**
	 * Modify attandance.
	 *
	 * @param attandanceMap the attandance map
	 * @throws Exception the exception
	 */
	public void  modifyAttendance(String empId,String date,String intime, boolean first,String outTime, boolean last,int rowno)throws BusinessException;

	/**
	 * Gets the attandace info.
	 *
	 * @param empId the emp id
	 * @return the attandace info
	 * @throws Exception the exception
	 */
	public ArrayList<Attendance> getAttandaceInfo(String empId, String date) throws BusinessException;
	
	/**
	 * Updates the logout status for the last day's last logout 
	 */
	public void updateLogOutStatus(String empId, String date, boolean status) throws BusinessException;
	
	public   ArrayList<HashMap<String,String>> employeeTimesheetInfo(
			String empId,String companyCode,String department,String from_date,String to_date, String unit, int mode) throws BusinessException;
	
	public void deleteAttEntry(String empId, int rowNum, String date) throws BusinessException;
	
	public void updateRowNum(int rowNum,String empId, String loginTime,String logOutTime, String date) throws BusinessException;
	
	public   LinkedHashMap<String, ArrayList<Attendance>> getAttEntry(String date,String company,String unit, String dept) throws BusinessException;

}
